/**
 * Created by zhaoyanzhi on 16-9-20.
 */
app.controller("registrationPage",function($scope,$location){
    $scope.jumpLandingPage=function(){
        $location.path("/landingPage")
    }
    $scope.saveUser=function(name,email,password,confirmPassword){
        if(password==confirmPassword){
            var user=new AV.User();
            user.setUsername(name);
            user.setPassword(password);
            user.setEmail(email);
            user.signUp().then(
                $scope.jumpLandingPage()
            );
            }else{
            $scope.value=false;
        }
      }
    })
